package cn.gameback.supervisionservices.mapper;

import cn.gameback.supervisionservices.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Collection;
import java.util.List;

/**
 * 为User实体类创建相应的Mapper接口 继承自BaseMapper接口
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    User getUserByUsername(String username);

    User getUserById(@Param("id") Integer id);

    List<User> getAllUsers();

    void saveUser(User user);

    void updateUser(User user);

    void deleteUser(@Param("id") Integer id);
}
